package com.wits.qso.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.wits.platform.service.BaseService;
import com.wits.qso.dao.CreContentDao;
import com.wits.qso.entity.Aid;
import com.wits.qso.entity.Btable;
import com.wits.qso.entity.CreContent;
import com.wits.qso.entity.HomeworkH;
import com.wits.qso.entity.MaterialD;

@Component
public class CreContentService extends BaseService<CreContent, String>
{
	private CreContentDao creContentDao = null;

	@Autowired
	public void setCreContentDao(CreContentDao creContentDao) {
		this.baseDao = creContentDao;
		this.creContentDao = creContentDao;
	}
	
	public Aid findAidByBtable(Btable btable) {
		 return creContentDao.findAidByBtable( btable );
	}
	
	public CreContent findCreContentByBtable(Btable btable) {
		return creContentDao.findCreContentByBtable( btable );
	}
	
	public HomeworkH findHomeworkHByBtable(Btable btable) {
		 return creContentDao.findHomeworkHByBtable( btable );
	}
	
	public List<MaterialD> findMaterialDByBtable(Btable btable) {
		 return creContentDao.findMaterialDByBtable( btable );
	}
	
	public List<CreContent> findByBtable(Btable btable) {
		return creContentDao.findByBtable( btable );
	}

	public int deleteByBtable(Btable btable) {
		return creContentDao.deleteByBtable( btable );
	}
}